package cn.tedu.zhyl.base.utils;

public class ScheduledTaskContext {
    private static final ThreadLocal<Boolean> isScheduledTask = new ThreadLocal<>();
    public static void setScheduledTask(boolean scheduled){
        isScheduledTask.set(scheduled);
    }

    public static boolean isScheduledTask(){
        return Boolean.TRUE.equals(isScheduledTask.get());
    }
    public static void clear(){
        isScheduledTask.remove();
    }
}
